﻿<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<style type="text/css">
	#a1{
		font-size:20px;
		color:rebeccapurple;
	}


</style>
<![endif]-->
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 租赁管理 <span class="c-gray en">&gt;</span> 业主信息管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">

		<div class="text-c">
			<input type="text" name="" id="name" placeholder="使用人 " style="width:250px" class="input-text">
			<button name="" class="btn btn-success" onclick="search()"><i class="Hui-iconfont">&#xe665;</i>搜索 </button>
		</div>

	<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"> <a class="btn btn-primary radius" onclick="admin_ad('购房合同','adds','800','500')"   title="业主购房合同" ><i class="Hui-iconfont">&#xe600;</i> 业主购房合同</a></span> <span class="r">共有数据：<strong><spen th:text="${pageInfo.size}"></spen></strong> 条</span> </div>
	<div class="mt-20">
		<table  class="table table-border table-bordered table-bg table-hover table-sort">
			<thead>
			<tr class="text-c">
				<th width="40"><input name="" type="checkbox" value=""></th>
				<th width="40">业主编号</th>
				<th width="80">住户编号</th>
				<th width="100">业主姓名</th>
				<th width="100">使用状态</th>
				<th width="100">业主电话</th>
				<th width="150">购房时间</th>
				<th width="150">身份证</th>
				<th width="60">产权状态</th>
				<th width="60">预付金额</th>
				<th width="60">租客</th>
				<th width="100">操作</th>
			</tr>
			</thead>
			<tbody>
			<tr class="text-c" th:each="owner,item:${pageInfo.list}">
				<td><input name="" type="checkbox" value=""></td>
				<td  th:text="${item.count}"> 业主编号</td>
				<td  th:text="${owner.o_number}"></td>
				<td th:text="${owner.o_name}"></td>
				<td  th:if="${owner.o_state=='出租'}" bgcolor="#66cdaa"  th:text="${owner.o_state}"></td>
				<td  th:if="${owner.o_state!='出租'}" bgcolor="red"  th:text="${owner.o_state}"></td>
				<td th:text="${owner.o_phone}"></td>
				<td th:text="${owner.o_jdate}"></td>
				<td th:text="${owner.o_carder}"></td>
				<td th:text="${owner.o_ownership}"></td>
				<td th:text="${owner.o_before}"></td>
				<td   th:onclick="admin_edit([['租客信息']],[['zhuke?o_id='+${owner.o_id}]],[[1]],[[550]],[[400]])"   th:text="${owner.o_remarks}"></td>
				<td><a style="text-decoration:none" onClick="admins(this,'10001')" href="javascript:;" title="下架"><i class="Hui-iconfont">&#xe6de;</i></a>
					<a style="text-decoration:none" class="ml-5"  href="javascript:;"  title="编辑" th:onclick="admin_edit([['业主合同']],[['ownerupdate?o_id='+${owner.o_id}]],[[1]],[[800]],[[500]])"><i class="Hui-iconfont">&#xe6df;</i></a>
					<a style="text-decoration:none" class="ml-5"   href="javascript:;" title="删除"  th:onclick="admins([[${owner.o_id}]],[[${owner.o_name}]])"><i class="Hui-iconfont">&#xe6e2;</i></a></td>
			</tr>
			</tbody>
		</table>
		<tr >
			第<spen th:text="${pageInfo.pageNum}"></spen>页/共<spen th:text="${pageInfo.pages}"></spen>
			<a href="" th:href="@{/students(pageNum=1)}"><button class="btn btn-success">首页</button></a>
			<a href="" th:href="@{/students(pageNum=${pageInfo.pageNum}-1)}"><button class="btn btn-success">上一页</button></a>
			<a href="" th:href="@{/students(pageNum=${pageInfo.pageNum}+1)}"><button class="btn btn-success">下一页</button></a>
			<a href="" th:href="@{/students(pageNum=${pageInfo.pages})}"><button class="btn btn-success">尾页</button></a>
		</select>
		</tr>
	</div>
</div>


<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript"></script>

<script type="text/javascript">

function search(){
    var name=$("#name").val();
    location.href="students?o_state="+name;
}






    //单个删除
    function admins(o_id,o_name){
        layer.confirm('你确定要删除'+o_name+'用户吗？',function(index){
            location.href="del?o_id="+o_id;
        });
    }

    function admin_edit(title,url,id,w,h){
        layer_show(title,url,w,h);
    }

</script>

<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<script src="https://cdn.bootcss.com/layer/2.4/layer.min.js"></script>

<script>

//添加
    function admin_ad(title,url,w,h){
        layer_show(title,url,w,h);
    }
    //批量删除
    $(function() {
        $("#checkAll").click(function(){//给全选按钮加上点击事件
            var xz = $(this).prop("checked");
            //判断全选按钮的选中状态
            var ck = $("[name='subBox']").prop("checked",xz);
            //让class名为qx的选项的选中状态和全选按钮的选中状态一致。

        });
    });
    $("#deleteNotice").click(function(){
        var cs_id =[];
        $('input[name="subBox"]:checked').each(function(){
            cs_id+=this.value;
        });
        /*cs_id=cs_id.substring(1);*/

        if(cs_id.length<=0){
            alert("请选择要删除的数据！");
        }else{
            if(confirm("你确定删除选中的吗？")){
                $.post("deletes",{cs_id:cs_id},function(date) {
                    if(data="success"){
                        window.location.reload();
                    }else if(data="error") {
                        alert("删除失败");
                    }
                })
            }
        }
    });



</script>
<!--<script>
    //单个删除
function cwdelete() {

    var cs_id="";

    $('a[name="cwdeletes"]').value(function() {
        cs_id+=this.value;
        alert(cs_id);
    })


    var flag=window.confirm("是否删除");
    if (flag) {
        $.post("deletes",{cs_id:cs_id},function(date) {
           if(date){
               window.location.reload();
           }else{
               alert("删除失败")
           }
        },"JSON")
    }

}


</script>-->

</body>
</html>